// All source files and native code may not be transmitted, reproduced, distributed, 
// or commercially exploited in any way without the express written consent of Sybex Inc.

//MOST THINGS THAT CHANGE

//CHAPTER TITLE
var TestChapter:String = "Chapter 3";

var user_Correct:Array = new Array("B","C","D","B","A","B","C","B","A","D","B","D","B","B","C","BC","D","A","A","B");

total = user_Correct.length;
_root.countdown = false;
// set to false to make the timer count up //
_root.hour = 0;
// number of hours at start//
_root.minute = 0;
// number of minutes at start//
//DON'T FORGET THE QUESTIONS AT THE END
//END OF MOST THINGS THAT CHANGE
//
//
//The following is used in the timer mc for adjusting the clock.
_root.delay = false;
_root.wait = 60;
//wait in seconds
_root.lastTime = Math.floor(getTimer()/1000);
i = 1;
totalCorrect = 0;
totalWrong = 0;
QCounter.QTotal.text = total;
Test_Title.text = TestChapter;
var finalCorrect:Number;
var userResponse:Array = new Array(total);
var markResponse:Array = new Array(total);
user_responseA = "";
user_responseB = "";
user_responseC = "";
user_responseD = "";
user_responseE = "";
user_responseF = "";
user_responseG = "";
user_responseH = "";
user_responseI = "";
user_responseJ = "";
user_responseK = "";
user_responseL = "";
user_responseM = "";
user_responseN = "";
_root.review = false;

function initialize() {
	_root.review = false;
	for (j=0; j<total; j++) {
		userResponse[j] = "";
		markResponse[j] = "";
	}
	
}

function showMatch() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;
}

// display multiple choice user_response answer function
function display() {
	set("user_response"+i, user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN);
	userResponse[i-1] = user_responseA+user_responseB+user_responseC+user_responseD+user_responseE+user_responseF+user_responseG+user_responseH+user_responseI+user_responseJ+user_responseK+user_responseL+user_responseM+user_responseN;

	//**NEW
	response.text = userResponse[i-1];
	
}

//radio button function
function answer(choice) {
	set("user_response"+i, choice);
	userResponse[i-1] = choice;
	
	//**NEW
	response.text = userResponse[i-1];	
}

// marker button fuction
function mark(choice) {
	_root["mark"+i] = choice;
	markResponse[i-1] = choice;
}

// display fill in the blank by user.
function submit(userInput) {
	_root["user_response"+i] = userInput;
}

function reset() {
	_root["user_response"+i] = "";
}

function UnloadReview() {
	//ReviewLinks.unloadMovie();
}


function LayoutQuestion() {

	qname = "q"+(_root._currentframe-1);
	
	markname = "m"+(_root._currentframe-1);
	
	_root.loadQuestion(_root._currentframe-1);	
	
	_root.createEmptyMovieClip("container", 1);

	_root.attachMovie("Marker_mc", markname, 2, {_x:65.4, _y:55.4});
	
	if (_root.question_type == "2R") { this.attachMovie("2R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3R") { this.attachMovie("3R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "3MC") { this.attachMovie("3MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4R") { this.attachMovie("4R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "4MC") { this.attachMovie("4MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5R") { this.attachMovie("5R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "5MC") { this.attachMovie("5MC", qname, 1, {_x:24, _y:165}); }	
	if (_root.question_type == "6R") { this.attachMovie("6R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "6MC") { this.attachMovie("6MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7R") { this.attachMovie("7R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "7MC") { this.attachMovie("7MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8R") { this.attachMovie("8R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "8MC") { this.attachMovie("8MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9R") { this.attachMovie("9R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "9MC") { this.attachMovie("9MC", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10R") { this.attachMovie("10R", qname, 1, {_x:24, _y:165}); }
	if (_root.question_type == "10MC") { this.attachMovie("10MC", qname, 1, {_x:24, _y:165}); }


	if (_root.review == false) { _root.attachMovie("show_answer", "show_answer1", 3, {_x:72, _y:418}); }
	if (_root.review == true)  { _root.attachMovie("show_review", "show_review1", 3, {_x:72, _y:418}); }
        if (_root.figure_flag == "True") { _root.attachMovie("show_figure", "show_figure1", 6, {_x:72, _y:418}); }
        if (_root.figure_flag == "False") { _root.createEmptyMovieClip("container", 6); }        

	question_scroll._visible = (question_text.maxscroll > 1);
	question_scroll.setSize(85,16); 
	
	//**NEW
	response.text = userResponse[i-1];
}

function loadQuestion(inNum:Number) {
	var cur:Number = inNum;
	//This corrects for the first frame holding all functions
	//QUESTIONS AND ANSWERS CAN ACCEPT HTML FORMATTING!!!
	//EACH QUESTION SHOULD BE FORMATTED SIMILAR TO THE FOLLOWING.

	switch (cur) {
case 1 :
_root.question = "You have a notebook computer and wish to connect to an IEEE 802.11g wireless network. The computer does not have a built-in wireless LAN card. You do not want any peripherals connected to the notebook that use wires and do not want to disassemble the computer. Which wireless adapter would be the best solution?";
_root.answerA = "Wireless PCI";
_root.answerB = "Wireless PCMCIA";
_root.answerC = "Wireless Mini-PCI";
_root.answerD = "Wireless WSB 2.0";
_root.correct = "B";
_root.explanation = "Wireless PCMCIA adapters connect through a slot in the notebook computer.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 2 :
_root.question = "You need to select a wireless LAN card for a notebook computer to connect to an IEEE 802.11n network. The notebook has a slot on the side that will accept one of three physical types of adapter. Which card would work best in this case?";
_root.answerA = "PCI";
_root.answerB = "Mini-PCIe";
_root.answerC = "PCMCIA";
_root.answerD = "CompactFlash";
_root.correct = "C";
_root.explanation = "PCMCIA cards are available in three types. The only difference in the three types is the thickness.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 3 :
_root.question = "In addition to wireless networking, which card was designed for flash memory storage and can be used in a digital camera?";
_root.answerA = "PCI";
_root.answerB = "PCMCIA";
_root.answerC = "ISA";
_root.answerD = "SD";
_root.correct = "D";
_root.explanation = "SDIO cards were originally designed for flash memory storage used in digital cameras and evolved to be used in IEEE 802.11 wireless devices.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 4 :
_root.question = "A ___________________ computer requires the user to disassemble the computer case to install a wireless PCI network adapter. Which computer would be the best candidate in this situation?";
_root.answerA = "Notebook";
_root.answerB = "Desktop";
_root.answerC = "Pocket PC";
_root.answerD = "PDA";
_root.correct = "B";
_root.explanation = "A PCI adapter is a 32-bit card that requires a PCI slot inside a desktop computer. Notebook computers, Pocket PCs, and PDAs will use external cards such as Mini-PCI.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 5 :
_root.question = "Which step is required for installation of a wireless 802.11n PCMCIA adapter card?";
_root.answerA = "Install device driver";
_root.answerB = "Install client utility";
_root.answerC = "Install profile software";
_root.answerD = "Install Windows WZC";
_root.correct = "A";
_root.explanation = "A device driver is required for the PCMCIA card to function with the operating system.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 6 :
_root.question = "You want to connect a desktop computer to an IEEE 802.11g wireless network. Which wireless LAN adapter would be the best solution if you do not want to disassemble the computer?";
_root.answerA = "Mini-PCI";
_root.answerB = "USB 2.0";
_root.answerC = "Mini-PCIe";
_root.answerD = "PCMCIA";
_root.correct = "B";
_root.explanation = "A USB 2.0 adapter can be connected to a port on the outside of the computer. Mini-PCI and Mini-PCIe are typically used in notebook computers and other portable devices and require some level of disassembly. PCMCIA cards can be used in desktop computers only if an internal PCI adapter is used, which will require disassembly of the computer case.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 7 :
_root.question = "Which client device will allow a user to connect several Ethernet devices on a common segment to an access point?";
_root.answerA = "PCMCIA";
_root.answerB = "PCI bridge";
_root.answerC = "Wireless client bridge";
_root.answerD = "Ethernet bridge";
_root.correct = "C";
_root.explanation = "A wireless client bridge will connect an Ethernet segment to a wireless network, allowing all devices connected to a common physical layer boundary to communicate wirelessly.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 8 :
_root.question = "USB was designed as a replacement for which two legacy communication connections?";
_root.answerA = "Serial and PCI";
_root.answerB = "Serial and parallel";
_root.answerC = "Parallel and ISA";
_root.answerD = "Parallel and EISA";
_root.correct = "B";
_root.explanation = "The original USB standard was intended to replace serial and parallel ports.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 9 :
_root.question = "How many data bits does serial communications transmit at a time?";
_root.answerA = "1";
_root.answerB = "3";
_root.answerC = "4";
_root.answerD = "8";
_root.correct = "A";
_root.explanation = "Serial communications transmits one bit at a time. Parallel transmits several bits at a time.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 10 :
_root.question = "Which wireless adapter may require some disassembly of a notebook computer to install?";
_root.answerA = "PCI";
_root.answerB = "PCMCIA";
_root.answerC = "PC Card";
_root.answerD = "Mini-PCI";
_root.correct = "D";
_root.explanation = "A Mini-PCI card may be mounted in a panel or within the computer case.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 11 :
_root.question = "Most manufacturers recommend installing a PCMCIA adapter at what point?";
_root.answerA = "When the computer not powered on";
_root.answerB = "When instructed by the setup utility";
_root.answerC = "After calling technical support";
_root.answerD = "Before starting the setup process";
_root.correct = "B";
_root.explanation = "Most manufacturers recommend installing a PCMCIA card at a specific point. This is usually after the device driver has been copied to the computer during the setup process.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 12 :
_root.question = "Enterprise-grade IEEE 802.11g client utilities typically contain which advanced feature?";
_root.answerA = "PCI configuration";
_root.answerB = "Spectrum analyzer";
_root.answerC = "Setup wizard";
_root.answerD = "Site survey";
_root.correct = "D";
_root.explanation = "Enterprise client utilities have more advanced features such as a site survey utility. PCI configuration includes physical settings prior to installation. A spectrum analyzer is a separate product used to analyze radio frequency. A setup wizard can be a part of a SOHO-grade adapter as well as an enterprise-grade adapter.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 13 :
_root.question = "Which item is required for an IEEE 802.11g PCI card to communicate with a computer connected to an unsecured wireless LAN?";
_root.answerA = "Mini-PCI card";
_root.answerB = "Device driver";
_root.answerC = "Third -party utility";
_root.answerD = "Enterprise utility";
_root.correct = "B";
_root.explanation = "Device drivers are required in order for the network adapter to communicate with the operating system.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 14 :
_root.question = "A wireless workgroup/client bridge will allow which of the following?";
_root.answerA = "Connect two LANs together";
_root.answerB = "Connect a wired LAN to an AP";
_root.answerC = "Connect a PCI card to a LAN";
_root.answerD = "Connect two client bridges";
_root.correct = "B";
_root.explanation = "A wireless workgroup/client bridge will connect an Ethernet segment to an access point.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 15 :
_root.question = "CompactFlash (CF) cards are available in two types. What is the main difference between the two types?";
_root.answerA = "Length";
_root.answerB = "Width";
_root.answerC = "Thickness";
_root.answerD = "Height";
_root.correct = "C";
_root.explanation = "CF cards are identical in length and width. Type I is 3.3 mm thick and Type II is 5.0 mm thick.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 16 :
_root.question = "Which two wireless LAN adapters can be installed in a computer without the need to disassemble the computer in any way? (Choose 2.)";
_root.answerA = "PCI";
_root.answerB = "PCMCIA";
_root.answerC = "USB 1.1";
_root.answerD = "PCIe";
_root.answerE = "Mini-PCI";
_root.correct = "BC";
_root.explanation = "PCMCIA and USB devices connect to a slot on the outside of the computer.";
_root.figure_flag = "False";
_root.question_type = "5MC";
break;

case 17 :
_root.question = "Secure Digital Input Output (SDIO) cards are typically installed in which device?";
_root.answerA = "Desktop computer";
_root.answerB = "Access point";
_root.answerC = "Notebook computer";
_root.answerD = "Pocket PC";
_root.correct = "D";
_root.explanation = "Pocket PCs have SD slots and can use SDIO cards.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 18 :
_root.question = "A device driver can be used in wireless networking. Which is an example of a device driver?";
_root.answerA = "Software to control a wireless NIC";
_root.answerB = "Software to control the OS";
_root.answerC = "Hardware to install a PCI card";
_root.answerD = "Hardware to install a client bridge";
_root.correct = "A";
_root.explanation = "Wireless network cards require device drivers in order for the card to work with the computer operating system.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 19 :
_root.question = "Six wired clients can connect to a wireless LAN by using which device?";
_root.answerA = "Workgroup/client bridge";
_root.answerB = "PCI bridge";
_root.answerC = "Mini-PCI adapter";
_root.answerD = "PCI adapter";
_root.correct = "A";
_root.explanation = "Wireless workgroup/client bridges can connect wired devices to a wireless LAN.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

case 20 :
_root.question = "Which is required in order to successfully install an IEEE 802.11g wireless LAN adapter?";
_root.answerA = "Security profile";
_root.answerB = "Device driver";
_root.answerC = "Third-party client utility";
_root.answerD = "SOHO utility";
_root.correct = "B";
_root.explanation = "Device drivers are required. A third-party client utility is optional because manufacturers usually include a utility with the device.";
_root.figure_flag = "False";
_root.question_type = "4R";
break;

	}
		
	QCounter.QCurrent.text = cur;
}

initialize();


//Change the following question numbers to the indicated question type!
//1. 4R
//2. 4R
//3. 4R
//4. 4R
//5. 4R
//6. 4R
//7. 4R
//8. 4R
//9. 4R
//10. 4R
//11. 4R
//12. 4R
//13. 4R
//14. 4R
//15. 4R
//16. 5MC
//17. 4R
//18. 4R
//19. 4R
//20. 4R





//